home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / bildschirmschoner / fracblanker / source / gtlayout.h < prev    next >
C/C++ Source or Header  |  1996-04-07  |  20KB  |  621 lines

  1. #ifndef _GTLAYOUT_H
  2. #define _GTLAYOUT_H
  3.  
  4. /*
  5. **    GadTools layout toolkit
  6. **
  7. **    Copyright © 1993-1994 by Olaf `Olsen' Barthel
  8. **    Freely distributable.
  9. */
  10.  
  11.  
  12. /*****************************************************************************/
  13.  
  14.  
  15. #if !defined(LIB_CODE) && !defined(SHARED_LIB) && !defined(LINK_LIB)
  16. #define SHARED_LIB 1
  17. #endif
  18.  
  19. #ifdef _DCC
  20. #define __stdargs __stkargs
  21. #endif    /* _DCC */
  22.  
  23. #ifdef LIB_CODE
  24. #define REG(x)    register __ ## x
  25. #define LIBENT    __asm __saveds
  26. #endif    /* LIB_CODE */
  27.  
  28. #ifdef SHARED_LIB
  29. #define REG(x)
  30. #define LIBENT
  31. #endif    /* SHARED_LIB */
  32.  
  33. #ifdef LINK_LIB
  34. #define REG(x)
  35. #define LIBENT    __regargs
  36. #endif    /* LINK_LIB */
  37.  
  38.  
  39. /*****************************************************************************/
  40.  
  41.  
  42. #ifndef EXEC_TYPES_H
  43. #include <exec/types.h>
  44. #endif
  45.  
  46. #ifndef INTUITION_INTUITION_H
  47. #include <intuition/intuition.h>
  48. #endif
  49.  
  50. #ifndef UTILITY_TAGITEM_H
  51. #include <utility/tagitem.h>
  52. #endif
  53.  
  54. #ifndef INTUITION_GADGETCLASS_H
  55. #include <intuition/gadgetclass.h>
  56. #endif
  57.  
  58. #ifndef LIBRARIES_GADTOOLS_H
  59. #include <libraries/gadtools.h>
  60. #endif
  61.  
  62.  
  63. /*****************************************************************************/
  64.  
  65.  
  66. typedef enum PlacementTypes
  67. {
  68.     PLACE_LEFT,
  69.     PLACE_RIGHT,
  70.     PLACE_ABOVE,
  71.     PLACE_IN,
  72.     PLACE_BELOW
  73. } PlacementTypes;
  74.  
  75. typedef enum AlignmentTypes
  76. {
  77.     ALIGNTEXT_LEFT,
  78.     ALIGNTEXT_CENTERED,
  79.     ALIGNTEXT_RIGHT,
  80.     ALIGNTEXT_PAD
  81. } AlignmentTypes;
  82.  
  83. typedef enum TapeDeckButtonTypes
  84. {
  85.     TDBT_BACKWARD,
  86.     TDBT_FORWARD,
  87.     TDBT_PREVIOUS,
  88.     TDBT_NEXT,
  89.     TDBT_STOP,
  90.     TDBT_PAUSE,
  91.     TDBT_RECORD,
  92.     TDBT_REWIND,
  93.     TDBT_EJECT,
  94.     TDBT_PLAY,
  95.  
  96.     TDBTLAST
  97. } TapeDeckButtonTypes;
  98.  
  99. typedef LONG (* __stdargs DISPFUNC)(struct Gadget *gad,WORD value);
  100.  
  101. #define ALIGNF_RIGHT        (1 << 0)
  102. #define ALIGNF_LEFT        (1 << 1)
  103. #define ALIGNF_TOP        (1 << 2)
  104. #define ALIGNF_BOTTOM        (1 << 3)
  105. #define ALIGNF_EXTRA_RIGHT    (1 << 4)
  106. #define ALIGNF_EXTRA_LEFT    (1 << 5)
  107. #define ALIGNF_EXTRA_TOP    (1 << 6)
  108. #define ALIGNF_EXTRA_BOTTOM    (1 << 7)
  109.  
  110.  
  111. /*****************************************************************************/
  112.  
  113.  
  114. /* Generic tags, applicable for several object types */
  115. #define LA_Chars        TAG_USER+2
  116. #define LA_LabelPlace        TAG_USER+3
  117. #define LA_ExtraSpace        TAG_USER+4
  118. #define LA_NoKey        TAG_USER+30
  119. #define LA_HighLabel        TAG_USER+31
  120. #define LA_LabelText        TAG_USER+37
  121. #define LA_LabelID        TAG_USER+38
  122. #define LA_ID            TAG_USER+39
  123. #define LA_Type            TAG_USER+40
  124. #define LA_PageSelector        TAG_USER+79
  125. #define LA_LabelChars        TAG_USER+107
  126.  
  127. /* Storage type tags */
  128. #define STORE_BYTE        TAG_USER+63
  129. #define LA_BYTE            TAG_USER+63
  130. #define STORE_UBYTE        TAG_USER+64
  131. #define LA_UBYTE        TAG_USER+64
  132. #define STORE_WORD        TAG_USER+65
  133. #define LA_WORD            TAG_USER+65
  134. #define STORE_BOOL        TAG_USER+65
  135. #define LA_BOOL            TAG_USER+65
  136. #define STORE_UWORD        TAG_USER+66
  137. #define LA_UWORD        TAG_USER+66
  138. #define STORE_LONG        TAG_USER+67
  139. #define LA_LONG            TAG_USER+67
  140. #define STORE_ULONG        TAG_USER+68
  141. #define LA_ULONG        TAG_USER+68
  142. #define STORE_STRPTR        TAG_USER+69
  143. #define LA_STRPTR        TAG_USER+69
  144. #define STORE_FRACTION        TAG_USER+68
  145. #define LA_FRACTION        TAG_USER+68
  146.  
  147. /* for use with LT_GetAttributes() only */
  148. #define LA_Left            TAG_USER+16
  149. #define LA_Top            TAG_USER+17
  150. #define LA_Width        TAG_USER+18
  151. #define LA_Height        TAG_USER+19
  152. #define LA_LabelLeft        TAG_USER+114
  153. #define LA_LabelTop        TAG_USER+115
  154.  
  155. /* TEXT_KIND */
  156. #define LATX_Picker        TAG_USER+5
  157.  
  158. /* VERTICAL_KIND, HORIZONTAL_KIND */
  159. #define LAGR_Spread        TAG_USER+6
  160. #define LAGR_SameSize        TAG_USER+8
  161. #define LAGR_LastAttributes    TAG_USER+46
  162. #define LAGR_ActivePage        TAG_USER+58
  163. #define LAGR_Frame        TAG_USER+104
  164.  
  165. /* FRAME_KIND */
  166. #define LAFR_InnerWidth        TAG_USER+9
  167. #define LAFR_InnerHeight    TAG_USER+10
  168. #define LAFR_DrawBox        TAG_USER+11
  169. #define LAFR_RefreshHook    TAG_USER+117
  170.  
  171. /* BOX_KIND */
  172. #define LABX_Labels        TAG_USER+12
  173. #define LABX_Lines        TAG_USER+13
  174. #define LABX_Rows        TAG_USER+1
  175. #define LABX_Index        TAG_USER+14
  176. #define LABX_Text        TAG_USER+15
  177. #define LABX_AlignText        TAG_USER+27
  178. #define LABX_DrawBox        TAG_USER+11
  179. #define LABX_FirstLabel        TAG_USER+44
  180. #define LABX_LastLabel        TAG_USER+45
  181. #define LABX_ReserveSpace    TAG_USER+72
  182. #define LABX_LabelTable        TAG_USER+98
  183.  
  184. /* FRACTION_KIND */
  185. #define LAFC_MaxChars        TAG_USER+20
  186. #define LAFC_Number        TAG_USER+21
  187. #define LAFC_LastGadget        TAG_USER+28
  188. #define LAFC_Min        TAG_USER+23
  189. #define LAFC_Max        TAG_USER+24
  190. #define LAFC_HistoryLines    TAG_USER+59
  191. #define LAFC_HistoryHook    TAG_USER+80
  192.  
  193. /* SLIDER_KIND */
  194. #define LASL_FullCheck        TAG_USER+22
  195.  
  196. /* LISTVIEW_KIND */
  197. #define LALV_ExtraLabels    TAG_USER+26
  198. #define LALV_Labels        TAG_USER+33
  199. #define LALV_CursorKey        TAG_USER+35
  200. #define LALV_Lines        TAG_USER+1
  201. #define LALV_Link        TAG_USER+7
  202. #define LALV_FirstLabel        TAG_USER+44
  203. #define LALV_LastLabel        TAG_USER+45
  204. #define LALV_MaxGrowX        TAG_USER+77
  205. #define LALV_MaxGrowY        TAG_USER+78
  206. #define LALV_LabelTable        TAG_USER+98
  207. #define LALV_LockSize        TAG_USER+106
  208. #define LALV_ResizeX        TAG_USER+109
  209. #define LALV_ResizeY        TAG_USER+110
  210. #define LALV_MinChars        TAG_USER+111
  211. #define LALV_MinLines        TAG_USER+112
  212. #define LALV_FlushLabelLeft    TAG_USER+113
  213.  
  214. /* INTEGER_KIND */
  215. #define LAIN_LastGadget        TAG_USER+28
  216. #define LAIN_Min        TAG_USER+23
  217. #define LAIN_Max        TAG_USER+24
  218. #define LAIN_UseIncrementers    TAG_USER+57
  219. #define LAIN_HistoryLines    TAG_USER+59
  220. #define LAIN_HistoryHook    TAG_USER+80
  221. #define LAIN_IncrementerHook    TAG_USER+85
  222.  
  223. /* STRING_KIND */
  224. #define LAST_LastGadget        TAG_USER+28
  225. #define LAST_Link        TAG_USER+7
  226. #define LAST_Picker        TAG_USER+5
  227. #define LAST_HistoryLines    TAG_USER+59
  228. #define LAST_HistoryHook    TAG_USER+80
  229. #define LAST_CursorPosition    TAG_USER+105
  230.  
  231. /* PASSWORD_KIND */
  232. #define LAPW_String             GTST_String
  233. #define LAPW_LastGadget        TAG_USER+28
  234. #define LAPW_HistoryLines    TAG_USER+59
  235. #define LAPW_HistoryHook    TAG_USER+80
  236.  
  237. /* PALETTE_KIND */
  238. #define LAPA_SmallPalette    TAG_USER+32
  239. #define LAPA_Lines        LA_Lines
  240.  
  241. /* BUTTON_KIND */
  242. #define LABT_ReturnKey        TAG_USER+34
  243. #define LABT_EscKey        TAG_USER+56
  244. #define LABT_ExtraFat        TAG_USER+29
  245.  
  246. /* GAUGE_KIND */
  247. #define LAGA_Percent        TAG_USER+36
  248. #define LAGA_InfoLength        TAG_USER+70
  249. #define LAGA_InfoText        TAG_USER+71
  250.  
  251. /* CYCLE_KIND */
  252. #define LACY_FirstLabel        TAG_USER+44
  253. #define LACY_LastLabel        TAG_USER+45
  254. #define LACY_LabelTable        TAG_USER+98
  255. #define LACY_AutoPageID        TAG_USER+103
  256. #define LACY_TabKey        TAG_USER+118
  257.  
  258. /* LEVEL_KIND */
  259. #define LAVL_Min        GTSL_Min
  260. #define LAVL_Max        GTSL_Max
  261. #define LAVL_Level        GTSL_Level
  262. #define LAVL_LevelFormat    GTSL_LevelFormat
  263. #define LAVL_LevelPlace        GTSL_LevelPlace
  264. #define LAVL_DispFunc        GTSL_DispFunc
  265. #define LAVL_FullCheck        LASL_FullCheck
  266.  
  267. /* MX_KIND */
  268. #define LAMX_FirstLabel        TAG_USER+44
  269. #define LAMX_LastLabel        TAG_USER+45
  270. #define LAMX_LabelTable        TAG_USER+98
  271. #define LAMX_TabKey        TAG_USER+118
  272.  
  273. /* SCROLLER_KIND */
  274. #define LASC_Thin        TAG_USER+62
  275.  
  276. /* XBAR_KIND */
  277. #define LAXB_FullSize        TAG_USER+50
  278.  
  279. /* TAPEDECK_KIND */
  280. #define LATD_ButtonType        TAG_USER+86
  281. #define LATD_Toggle        TAG_USER+87
  282. #define LATD_Pressed        TAG_USER+88
  283. #define LATD_Smaller        TAG_USER+89
  284.  
  285. /* MX_KIND */
  286. #define LAMX_AutoPageID        TAG_USER+103
  287.  
  288. /* Applicable for window only */
  289. #define LAWN_Menu        TAG_USER+25
  290. #define LAWN_UserPort        TAG_USER+47
  291. #define LAWN_Left        TAG_USER+48
  292. #define LAWN_Top        TAG_USER+49
  293. #define LAWN_Zoom        TAG_USER+50
  294. #define LAWN_MaxPen        TAG_USER+52
  295. #define LAWN_BelowMouse        TAG_USER+53
  296. #define LAWN_MoveToWindow    TAG_USER+54
  297. #define LAWN_AutoRefresh    TAG_USER+55
  298. #define LAWN_HelpHook        TAG_USER+73
  299. #define LAWN_Parent        TAG_USER+81
  300. #define LAWN_BlockParent    TAG_USER+82
  301. #define LAWN_SmartZoom        TAG_USER+91
  302. #define LAWN_Title        TAG_USER+92
  303. #define LAWN_TitleText        TAG_USER+92
  304. #define LAWN_Bounds        TAG_USER+93
  305. #define LAWN_ExtraWidth        TAG_USER+94
  306. #define LAWN_ExtraHeight    TAG_USER+95
  307. #define LAWN_IDCMP        TAG_USER+96
  308. #define LAWN_AlignWindow    TAG_USER+97
  309. #define LAWN_TitleID        TAG_USER+99
  310.  
  311. /* Applicable for menus only. */
  312. #define LAMN_FirstLabel        LABX_FirstLabel
  313. #define LAMN_LastLabel        LABX_LastLabel
  314. #define LAMN_LabelTable        TAG_USER+98
  315.  
  316. /* Applicable for layout handle only */
  317. #define LH_Font            TAG_USER+41
  318. #define LH_AutoActivate        TAG_USER+42
  319. #define LH_LocaleHook        TAG_USER+4
  320. #define LH_CloningPermitted    TAG_USER+61
  321. #define LH_EditHook        TAG_USER+74
  322. #define LH_ExactClone        TAG_USER+75
  323. #define LH_MenuGlyphs        TAG_USER+76
  324. #define LH_Parent        TAG_USER+83
  325. #define LH_BlockParent        TAG_USER+84
  326. #define LH_SimpleClone        TAG_USER+90
  327. #define LH_Expand        TAG_USER+102
  328. #define LH_ExitFlush        TAG_USER+108
  329. #define LH_UserData        TAG_USER+116
  330.  
  331. /* Private tags; do not use, or you'll run into trouble! */
  332. #define LA_Private1        TAG_USER+100
  333. #define LA_Private2        TAG_USER+101
  334.  
  335. /* Last tag item value used */
  336. #define LAST_TAG        TAG_USER+118
  337.  
  338.  
  339. /*****************************************************************************/
  340.  
  341.  
  342. /* Identifies the absence of a link for a listview or a string gadget */
  343. #define NIL_LINK        -2
  344.  
  345.  
  346. /*****************************************************************************/
  347.  
  348.  
  349.     /* String gadget type history hook support: you will either get
  350.      * the following value passed as the message parameter to your
  351.      * hook function, or a pointer to a null-terminated string you should
  352.      * copy and create a Node from, which you should then add to the tail
  353.      * of your history list. Place a pointer to your history list in the
  354.      * Hook.h_Data entry.
  355.      */
  356.  
  357. #define HISTORYHOOK_DISCARD_OLDEST    0    // Discard oldest entry
  358.  
  359.  
  360. /*****************************************************************************/
  361.  
  362.  
  363.     /* Refresh hook support: you will get the following structure
  364.      * passed as the message and a pointer to the LayoutHandle as
  365.      * the object.
  366.      */
  367.  
  368. typedef struct RefreshMsg
  369. {
  370.     LONG    ID;
  371.     WORD    Left,
  372.         Top,
  373.         Width,
  374.         Height;
  375. } RefreshMsg;
  376.  
  377. /*****************************************************************************/
  378.  
  379.  
  380.     /* Incrementer hook support: you will get the current value
  381.      * passed as the object and one of the following values as
  382.      * the message. Return the number to be used.
  383.      */
  384.  
  385. typedef enum IncrementerMsgTypes
  386. {
  387.     INCREMENTERMSG_DECREMENT = -1,    // Decrement value
  388.     INCREMENTERMSG_INITIAL   =  0,    // Initial value passed upon gadget creation
  389.     INCREMENTERMSG_INCREMENT =  1    // Increment value
  390. } IncrementerMsgTypes;
  391.  
  392.  
  393. /*****************************************************************************/
  394.  
  395.     /* Help key hook support: the hook will be called with a "struct IBox *"
  396.      * as the object and a "struct HelpMsg *". The IBox describes the object
  397.      * the mouse was positioned over, such as a button, a listview, etc.
  398.      * The "ObjectID" will indicate the ID of the object the mouse was
  399.      * positioned over. The ID will be -1 if no object was to be found.
  400.      */
  401.  
  402. typedef struct HelpMsg
  403. {
  404.     struct LayoutHandle    *Handle;    // Window layout handle
  405.     LONG             ObjectID;    // ID of the object, -1 for full window
  406. } HelpMsg;
  407.  
  408.  
  409. /*****************************************************************************/
  410.  
  411.  
  412. /* Obsolete tags, don't use in new code */
  413. #define LA_Lines        LABX_Rows
  414. #define LA_Spread        LAGR_Spread
  415. #define LA_SameSize        LAGR_SameSize
  416. #define LA_FullCheck        LASL_FullCheck
  417. #define LA_ExtraLabels        LALV_ExtraLabels
  418. #define LA_LastGadget        LAFC_LastGadget
  419. #define LA_SmallPalette        LAPA_SmallPalette
  420. #define LA_Labels        LALV_Labels
  421. #define LA_Picker        LATX_Picker
  422. #define LA_DrawBox        LAFR_DrawBox
  423. #define LA_FirstLabel        LABX_FirstLabel
  424. #define LA_LastLabel        LABX_LastLabel
  425. #define LA_LabelTable        LABX_LabelTable
  426. #define LA_Min            LAFC_Min
  427. #define LA_Max            LAFC_Max
  428. #define LA_Link            LALV_Link
  429. #define LA_Menu            LAWN_Menu
  430. #define LA_HistoryLines        LAST_HistoryLines
  431. #define LA_HistoryHook        LAST_HistoryHook
  432. #define LA_ReturnKey        LABT_ReturnKey
  433. #define LA_ExtraFat        LABT_ExtraFat
  434. #define LA_CursorKey        LALV_CursorKey
  435.  
  436.  
  437. /*****************************************************************************/
  438.  
  439.  
  440. /* kinds of objects supported in addition to the normal GadTools kinds */
  441. #define HORIZONTAL_KIND        45
  442. #define VERTICAL_KIND        46
  443. #define END_KIND        47
  444. #define FRAME_KIND        48
  445. #define BOX_KIND        49
  446. #define FRACTION_KIND        50
  447. #define XBAR_KIND        51
  448. #define YBAR_KIND        52
  449. #define PASSWORD_KIND        53
  450. #define GAUGE_KIND        54
  451. #define TAPEDECK_KIND        55
  452. #define LEVEL_KIND        56
  453.  
  454.  
  455. /*****************************************************************************/
  456.  
  457.  
  458. /* in support of FRACTION_KIND gadgets */
  459.  
  460. typedef ULONG            FIXED;
  461. #define FIXED_UNITY        10000
  462.  
  463. #define TO_FIXED(l,r)        (FIXED_UNITY * (l) + (r))
  464. #define FIXED_LEFT(f)        ((f) / FIXED_UNITY)
  465. #define FIXED_RIGHT(f)        ((f) % FIXED_UNITY)
  466.  
  467.  
  468. /*****************************************************************************/
  469.  
  470.  
  471. #ifndef _GTLAYOUT_C
  472. typedef struct LayoutHandle
  473. {
  474.     struct Screen        *Screen;
  475.     struct DrawInfo        *DrawInfo;
  476.     struct Window        *Window;
  477.     APTR             VisualInfo;
  478.     struct Image        *AmigaGlyph,
  479.                 *CheckGlyph;
  480.     APTR             UserData;    // Requires gtlayout.library v9
  481.  
  482.     /* private fields follow.... */
  483. } LayoutHandle;
  484. #endif
  485.  
  486.  
  487. /*****************************************************************************/
  488.  
  489.  
  490. VOID LIBENT            LT_LevelWidth(REG(a0) struct LayoutHandle *handle,REG(a1) STRPTR levelFormat,REG(a2) DISPFUNC dispFunc,REG(d0) LONG min,REG(d1) LONG max,REG(a3) LONG *maxWidth,REG(a5) LONG *maxLen,REG(d2) BOOL fullCheck);
  491. VOID LIBENT            LT_DeleteHandle(REG(a0) struct LayoutHandle *Handle);
  492. struct LayoutHandle * LIBENT    LT_CreateHandle(REG(a0) struct Screen *Screen,REG(a1) struct TextAttr *Font);
  493. struct LayoutHandle * LIBENT    LT_CreateHandleTagList(REG(a0) struct Screen *Screen,REG(a1) struct TagItem *TagList);
  494. BOOL LIBENT            LT_RebuildTagList(REG(a0) struct LayoutHandle *handle,REG(d0) BOOL clear,REG(a1) struct TagItem *TagParams);
  495. VOID LIBENT            LT_HandleInput(REG(a0) struct LayoutHandle *Handle,REG(d0) ULONG MsgQualifier,REG(a1) ULONG *MsgClass,REG(a2) UWORD *MsgCode,REG(a3) struct Gadget **MsgGadget);
  496. VOID LIBENT            LT_BeginRefresh(REG(a0) struct LayoutHandle *handle);
  497. VOID LIBENT            LT_EndRefresh(REG(a0) struct LayoutHandle *handle,REG(d0) BOOL complete);
  498. LONG LIBENT            LT_GetAttributesA(REG(a0) struct LayoutHandle *Handle,REG(d0) LONG ID,REG(a1) struct TagItem *TagList);
  499. VOID LIBENT            LT_SetAttributesA(REG(a0) struct LayoutHandle *handle,REG(d0) LONG id,REG(a1) struct TagItem *TagList);
  500. VOID LIBENT            LT_NewA(REG(a0) struct LayoutHandle *handle,REG(a1) struct TagItem *tagList);
  501. VOID LIBENT            LT_EndGroup(REG(a0) struct LayoutHandle *handle);
  502. struct Window * LIBENT        LT_BuildA(REG(a0) struct LayoutHandle *Handle,REG(a1) struct TagItem *TagParams);
  503. struct Menu * LIBENT        LT_LayoutMenusA(REG(a0) struct LayoutHandle *handle,REG(a1) struct NewMenu *menuTemplate,REG(a2) struct TagItem *TagParams);
  504. VOID LIBENT            LT_Fixed2String(REG(d0) FIXED fixed,REG(d1) STRPTR buffer);
  505. FIXED LIBENT            LT_String2Fixed(REG(a0) STRPTR buffer);
  506. ULONG LIBENT            LT_FixedMult(REG(d0) FIXED fixed,REG(d1) ULONG factor);
  507. LONG LIBENT            LT_LabelWidth(REG(a0) struct LayoutHandle *handle,REG(a1) STRPTR label);
  508. LONG LIBENT            LT_LabelChars(REG(a0) struct LayoutHandle *handle,REG(a1) STRPTR label);
  509. VOID LIBENT            LT_LockWindow(REG(a0) struct Window *window);
  510. VOID LIBENT            LT_UnlockWindow(REG(a0) struct Window *window);
  511. VOID LIBENT            LT_DeleteWindowLock(REG(a0) struct Window *window);
  512. VOID LIBENT            LT_ShowWindow(REG(a0) struct LayoutHandle *handle,REG(a1) BOOL activate);
  513. VOID LIBENT            LT_Activate(REG(a0) struct LayoutHandle *handle,REG(d0) LONG id);
  514. VOID LIBENT            LT_PressButton(REG(a0) struct LayoutHandle *handle,REG(d0) LONG id);
  515. WORD LIBENT            LT_GetCode(REG(d0) ULONG MsgQualifier,REG(d1) ULONG MsgClass,REG(d2) UWORD MsgCode,REG(a0) struct Gadget *MsgGadget);
  516. struct IntuiMessage * LIBENT    LT_GetIMsg(REG(a0) struct LayoutHandle *Handle);
  517. VOID LIBENT            LT_ReplyIMsg(REG(a0) struct IntuiMessage *Msg);
  518. VOID LIBENT            LT_UpdateStrings(REG(a0) struct LayoutHandle *Handle);
  519.  
  520.  
  521. /*****************************************************************************/
  522.  
  523.  
  524. /* For use as link library */
  525.  
  526. BOOL                LT_Init(VOID);
  527. VOID                LT_Exit(VOID);
  528.  
  529. /* Available for library-internal use and as link library */
  530.  
  531. BOOL __stdargs            LT_RebuildTags(struct LayoutHandle *handle,BOOL clear,...);
  532. struct LayoutHandle * __stdargs    LT_CreateHandleTags(struct Screen *Screen,...);
  533. LONG __stdargs            LT_GetAttributes(struct LayoutHandle *Handle,LONG ID,...);
  534. VOID __stdargs            LT_SetAttributes(struct LayoutHandle *handle,LONG id,...);
  535. VOID __stdargs            LT_AddL(struct LayoutHandle *handle,UBYTE type,ULONG labelID,LONG id,...);
  536. VOID __stdargs            LT_Add(struct LayoutHandle *Handle,UBYTE Type,STRPTR Label,LONG ID,...);
  537. VOID __stdargs            LT_New(struct LayoutHandle *handle,...);
  538. struct Window * __stdargs    LT_Build(struct LayoutHandle *Handle,...);
  539. struct Window * __stdargs    LT_Layout(struct LayoutHandle *handle, STRPTR title,struct IBox *bounds,LONG extraWidth, LONG extraHeight,ULONG IDCMP, UBYTE align, ...);
  540. struct Menu * __stdargs        LT_LayoutMenus(struct LayoutHandle *handle,struct NewMenu *menuTemplate,...);
  541.  
  542.  
  543. /*****************************************************************************/
  544.  
  545.  
  546. /* Useful macros */
  547.  
  548. #define LT_GetString(Handle,Code)    ((STRPTR)LT_GetAttributes((Handle),(Code),TAG_DONE))
  549.  
  550.  
  551. /*****************************************************************************/
  552.  
  553.  
  554. /* Obsolete routines, do not use in new code. */
  555.  
  556. BOOL LIBENT                LT_Rebuild(REG(a0) struct LayoutHandle *handle,REG(a1) struct IBox *bounds,REG(a2) LONG extraWidth,REG(d0) LONG extraHeight,REG(d1) BOOL clear);
  557. struct Window * LIBENT            LT_LayoutA(REG(a0) struct LayoutHandle *handle, REG(a1) STRPTR title,REG(a2) struct IBox *bounds,REG(d0) LONG extraWidth, REG(d1) LONG extraHeight,REG(d2) ULONG IDCMP, REG(d3) UBYTE align, REG(a3) struct TagItem *TagParams);
  558. VOID LIBENT                LT_AddA(REG(a0) struct LayoutHandle *Handle,REG(d0) UBYTE Type,REG(d1) STRPTR Label,REG(d2) LONG ID,REG(a1) struct TagItem *TagList);
  559.  
  560. #define LT_GetDrawInfo(Handle)        (Handle) ? ((Handle) -> DrawInfo)    : NULL
  561. #define LT_GetVisualInfo(Handle)    (Handle) ? ((Handle) -> VisualInfo)    : NULL
  562. #define LT_GetScreen(Handle)        (Handle) ? ((Handle) -> Screen)        : NULL
  563. #define LT_SetAutoActivate(Handle,Mode)    LT_SetAttributes(Handle,0,LH_AutoActivate,Mode,TAG_DONE)
  564.  
  565.  
  566. /*****************************************************************************/
  567.  
  568.  
  569. #if !defined(LIB_CODE) && !defined(_GTLAYOUT_C) && !defined(NO_PRAGMAS)
  570. /*#pragma libcall GTLayoutBase LT_LevelWidth 1e 2DB10A907*/
  571. #pragma libcall GTLayoutBase LT_DeleteHandle 24 801
  572. #pragma libcall GTLayoutBase LT_CreateHandle 2a 9802
  573. #pragma libcall GTLayoutBase LT_CreateHandleTagList 30 9802
  574. #pragma tagcall GTLayoutBase LT_CreateHandleTags 30 9802
  575. #pragma libcall GTLayoutBase LT_Rebuild 36 10A9805
  576. #pragma libcall GTLayoutBase LT_HandleInput 3c BA90805
  577. #pragma libcall GTLayoutBase LT_BeginRefresh 42 801
  578. #pragma libcall GTLayoutBase LT_EndRefresh 48 0802
  579. #pragma libcall GTLayoutBase LT_GetAttributesA 4e 90803
  580. #pragma tagcall GTLayoutBase LT_GetAttributes 4e 90803
  581. #pragma libcall GTLayoutBase LT_SetAttributesA 54 90803
  582. #pragma tagcall GTLayoutBase LT_SetAttributes 54 90803
  583. #pragma libcall GTLayoutBase LT_AddA 5a 9210805
  584. #pragma tagcall GTLayoutBase LT_Add 5a 9210805
  585. #pragma libcall GTLayoutBase LT_NewA 60 9802
  586. #pragma tagcall GTLayoutBase LT_New 60 9802
  587. #pragma libcall GTLayoutBase LT_EndGroup 66 801
  588. #pragma libcall GTLayoutBase LT_LayoutA 6c B3210A9808
  589. #pragma tagcall GTLayoutBase LT_Layout 6c B3210A9808
  590. #pragma libcall GTLayoutBase LT_LayoutMenusA 72 A9803
  591. #pragma tagcall GTLayoutBase LT_LayoutMenus 72 A9803
  592. #pragma libcall GTLayoutBase LT_Fixed2String 78 1002
  593. #pragma libcall GTLayoutBase LT_String2Fixed 7e 801
  594. #pragma libcall GTLayoutBase LT_FixedMult 84 1002
  595. #pragma libcall GTLayoutBase LT_LabelWidth 8a 9802
  596. #pragma libcall GTLayoutBase LT_LabelChars 90 9802
  597. #pragma libcall GTLayoutBase LT_LockWindow 96 801
  598. #pragma libcall GTLayoutBase LT_UnlockWindow 9c 801
  599. #pragma libcall GTLayoutBase LT_DeleteWindowLock a2 801
  600. #pragma libcall GTLayoutBase LT_ShowWindow a8 9802
  601. #pragma libcall GTLayoutBase LT_Activate ae 0802
  602. #pragma libcall GTLayoutBase LT_PressButton b4 0802
  603. #pragma libcall GTLayoutBase LT_GetCode ba 821004
  604. /*--- Added in v1.78 --------------------------------------------------*/
  605. #pragma libcall GTLayoutBase LT_GetIMsg c0 801
  606. #pragma libcall GTLayoutBase LT_ReplyIMsg c6 801
  607. /*--- Added in v3.0 ---------------------------------------------------*/
  608. #pragma libcall GTLayoutBase LT_BuildA cc 9802
  609. #pragma tagcall GTLayoutBase LT_Build cc 9802
  610. #pragma libcall GTLayoutBase LT_RebuildTagList d2 90803
  611. #pragma tagcall GTLayoutBase LT_RebuildTags d2 90803
  612. /*--- Added in v9.0 ---------------------------------------------------*/
  613. #pragma libcall GTLayoutBase LT_UpdateStrings d8 801
  614. #endif    /* !LIB_CODE && !_GTLAYOUT_C && !NO_PRAGMAS */
  615.  
  616.  
  617. /*****************************************************************************/
  618.  
  619.  
  620. #endif    /* _GTLAYOUT_H */
  621.